﻿Public Class Nfisicas


    Public Function guardarfisicas(ByVal item As Entidades.Efisicas) As Boolean
        Dim oDatos As New Datos.Dfisicas
        Dim oFisicas As New List(Of Entidades.EFisicas)
        Dim band As Boolean
        Try
            band = oDatos.guardarperfisicas(item)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function

    Public Function modificarfisicas(ByVal item As Entidades.Efisicas) As Boolean
        Dim oDatos As New Datos.Dfisicas
        Dim oFisicas As New List(Of Entidades.Efisicas)
        Dim band As Boolean
        Try
            band = oDatos.modificarperfisicas(item)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function


    Public Function comboprovin() As DataTable
        Dim oDatos As New Datos.Dfisicas
        Try
            Return oDatos.llenarcomboprovin
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try

    End Function

    Public Function combodepartamentos(ByVal texto As String) As DataTable

        Dim oDatos As New Datos.Dfisicas
        Try
            Return oDatos.llenarcombodepartamento(texto)

        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
    End Function

    Public Function comboloc(ByVal texto As String) As DataTable

        Dim oDatos As New Datos.Dfisicas
        Try
            Return oDatos.llenarcombolocalidad(texto)

        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
    End Function

    Public Function buscartitular(ByVal texto As String) As DataTable

        Dim oDatos As New Datos.Dfisicas
        Try
            Return oDatos.buscartitulares(texto)

        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
    End Function

    Public Function buscageneral() As DataTable

        Dim oDatos As New Datos.Dfisicas
        Try
            Return oDatos.buscargeneral

        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
    End Function

    Public Function eliminarfisicas(ByVal item As Entidades.Efisicas) As Boolean
        Dim oDatos As New Datos.Dfisicas
        Dim oFisicas As New List(Of Entidades.Efisicas)
        Dim band As Boolean
        Try
            band = oDatos.eliminarperfisicas(item)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function

End Class
